- Data-structure for the storage of spell information
Written by Scott C. Ziegler for use with Simulcra RPG and AD&D.
This file and its intellectual contents are considered property of the creator and are to be treated as such with respect to use in other applications. Any use of this software for any purpose whatsoever must have explicit permission from the author of the file. This code is part of an ongoing development process for future possible products, and so is considered private property.
Do not use without permission. Author: Scott C. Ziegler <Aslan@Narnia.net>
vers. history:
05.31.00 - added the School property to SpellRecord (it was erroneously
absent.)
07.08.00 - fixed syntactic bug replacing append with setText.
07.08.00 - achieved a syntactically correct version.
08.23.00 - realized a major conceptual error in design and began to refit
09.07.00 - reached a syntactically correct version.
Work Needed:
- fix the components by string, as m is in somantic and may trigger material
Work Completed:
- Fixed append/setText bug
- fixed pervasive, conceptual error in DSs.
- added SpellRegister and SpellRecord members to the DSs.
*/
package Arcana;
import java.awt.*;
import java.io.*;
import java.util.*;
import java.awt.event.*;
import java.awt.Color;
// import SpellBookTest.Sorter;
// SpellRecord
//
// Data-structure for the storage of spell information
public class SpellRecord implements Sorter.Comparable, Serializable {
int Level;
String Name;
String School;
String Range;
int Components;
String Duration;
String CastingTime;
String AreaOfEffect;
String SavingThrow;
SpellDescription effect;
static final int VERBAL = 1;
static final int SOMANTIC = 2;
static final int MATERIAL = 4;
static final int VERBAL_SOMANTIC = 3;
static final int SOMANTIC_MATERIAL = 6;
static final int VERBAL_MATERIAL = 5;
static final int VERBAL_SOMANTIC_MATERIAL = 7;
SpellRegister register; // need to implement this though class
public SpellRecord(int lvl, String name, String school, String range,